import { Storage, guid } from "@/utils/util";

let flowData = {
  nodes: [
    {
      id: guid(),
      type: "task",
      x: 300,
      y: 100,
      properties: {
        parent_id: 0,
        children: [],
        name: "父节点一",
        num: 1,
        permission: ['before', 'after', 'child', 'task'],
        isDisabledNode:true,
        remark: '父节点一1备注',
        isExpand: false,
        isShow: true
      }
    },
    {
      id: guid(),
      type: 'task',
      x: 300,
      y: 200,
      properties: {
        parent_id: 0,
        children: [],
        name: "父节点二",
        num: 2,
        permission: ['before', 'after', 'child', 'task'],
        isDisabledNode:true,
        remark: '父节点二备注',
        isExpand: false,
        isShow: true
      }
    },
    // {
    //   id: '2-2',
    //   type: 'task',
    //   x: 600,
    //   y: 200,
    //   properties: {
    //     parent_id: 0,
    //     children: [],
    //     name: "开工准备2-2",
    //     num: 2,
    //     permission: ['before', 'after', 'child', 'task'],
    //     isDisabledNode:true,
    //     remark: '开工2-2备注'
    //   }
    // },
    // {
    //   id: '2-3',
    //   type: 'task',
    //   x: 600,
    //   y: 300,
    //   properties: {
    //     parent_id: 0,
    //     children: [],
    //     name: "开工准备2-3",
    //     num: 2,
    //     permission: ['before', 'after', 'child', 'task'],
    //     isDisabledNode:true,
    //     remark: '开工2-3备注'
    //   }
    // },
    {
      id: guid(),
      type: "task",
      x: 300,
      y: 500,
      properties: {
        parent_id: 0,
        children: [],
        name: "父节点三",
        num: 3,
        permission: ['before', 'after', 'child', 'task'],
        isDisabledNode:true,
        remark: '父节点三备注',
        isExpand: false,
        isShow: true
      }
    }
  ],
  edges: []
};

if (Storage.get('flowData')) {
  // flowData = Storage.get('flowData')
}

export default flowData;
